import { defineStore } from 'pinia'
import { ref } from 'vue'
import {getCompanyInfoById} from "@/api/company.js";

export const messageStore = defineStore(
    'messageInfo',
    () => {
        const messageInfo = ref('')
        const setMessageInfo = (newMessageInfo) => {
            messageInfo.value = newMessageInfo
        }
        const removeMessageInfo = () => {
            messageInfo.value = ''
        }
        const nowRole = ref('')
        const setNowRole = (newNowRole) => {
            nowRole.value = newNowRole
        }
        const removeNowRole = () => {
            nowRole.value = ''
        }
        return {
            messageInfo,
            setMessageInfo,
            removeMessageInfo,
            nowRole,
            setNowRole,
            removeNowRole
        }
    },
    {
        persist: true
    }
)
